package com.vchello.contants;

/**
 * 
 * @author power
 *
 * 2016年3月16日
 */
public enum TitleCode {
	
	REGISTER_INVESTOR("投资人登录成功", 1),
	REGISTER_PRO("创业者登录成功", 2),
	INVESTOR_SUBMIT_AUTH("提交成功", 3),
	INVESTOR_AUTH("认证提示", 4),
	FINDPASSWORD_EMAIL("发送成功", 5),
	FINDPASSWORD("设置成功", 6),
	ACTIVITY("报名成功", 7),
	UPDATEPASSWORD("修改成功", 8),
	INVESTOR_SHOW("提示", 9),
	SENDBP("bp发送成功", 10),
	RESERVATION("预约成功", 11),
	
	SUCCESS("成功", 200),
	NOTLOGIN("登录提示", 203),
	ERROR("系统错误", 500);

	private String title;
	private int code;
	
	private TitleCode(String title, int code){
		this.title = title;
		this.code = code;
	}
	
	  public static int getMessage(String title) {
		for (TitleCode codes : TitleCode.values()) {
			if (codes.getTitle().equals(title)) {
				return codes.code;
			}
		}
		return 0;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
	
	
}
